@include('admin.public.head')
@include('admin.public.pop')

<style type="text/css">

    .inner_btn {
        background: #19a97b;
        color: white;
        padding: 5px 8px;
        border-radius: 2px;
    }
</style>

<div class="ibox-title">
    <h5>预约管理</h5>
</div>

<div class="ibox-title">
<p>
    教室：{{$class_base_info['classsroom']['numbering']}}</br>
    教師：{{$class_base_info['teacher']['teacher_name']}}</br>
    价格：{{$class_base_info['class_base']['class_price']}}</br>
    課程：{{$class_base_info['class_base']['class_name']}}</br>
    時段：{{$class_base_info['class_time']['time_start']}}~{{$class_base_info['class_time']['time_end']}}</br>
    日期：{{$time}}</br>
</p>
</div>

<div class="ibox-content">
    <div class="row">
        <div class="col-sm-12 pull-right m-b-xs">
            <form action="">
                <div class="col-sm-1  m-b-xs text-center pull-right">
                    <button type="submit" class="btn btn-sm btn-primary">搜索</button> </span>
                </div>

                <div class="col-sm-2 text-center pull-right">
                    <input type="text" name="sear_value" value="{{$sear_value}}" placeholder="手機號/昵稱" class="input form-control">
                </div>

            </form>
        </div>
    </div>
    <table class="table table-bordered">
        <thead>
        <tr>
            <th>用戶頭像</th>
            <th>用戶昵稱</th>
            <th>手機號</th>
            <th>訓練時長(分鐘)</th>
            <th>積分</th>
            <th>操作</th>
            {{--            <th>編輯</th>--}}
        </tr>
        </thead>
        <tbody>
        @foreach ($result as $k=>$v)
            <tr>
                <td>
                    <img src="{{$v->head_img}}" width="300" height="150">
                </td>
                <td>
                    {{$v->nickname??''}}
                </td>
                <td>{{$v->phone}}</td>
                <td>{{$v->total_train_time??''}}</td>
                <td>{{$v->total_integral??''}}</td>
                <td>
                    <div class="btn-group">
                        <a  class="btn btn-primary btn-sm dropdown-toggle" onclick="do_reservation_edit($(this),'你確定要操作?','操作成功!')" url="/home_reservation_do/{{$class_base_info_id}}/{{$time}}/{{$v->id}}/{{$camp}}"  href="javascript:void(0)">@if($camp == 2)預約@else补课@endif
                        </a>
                    </div>
                    <div class="btn-group">
                        <a  class="btn btn-primary btn-sm dropdown-toggle" href="/points_record/{{$v->id}}">積分記錄
                        </a>&nbsp;&nbsp;
                    </div>
                </td>
            </tr>
        @endforeach
        </tbody>
        {{ $result->appends(Request::except ('page'))->links() }}
    </table>
    {{ $result->appends(Request::except ('page'))->links() }}

</div>

